<?php

/*
 * Fresns Control Panel (Standalone)
 * Copyright (C) 2021-Present 刘鑫
 * Released under the MIT License.
 */

namespace App\Plugins\FcpApi\TweetNotifyTemplates;

use App\Base\Services\BaseAdminService;
use App\Plugins\FcpApi\TweetConfigs\TweetConfigs;
use App\Plugins\FcpApi\TweetConfigs\TweetConfigService;

class FsService extends BaseAdminService
{
    public function __construct()
    {
        $this->model = new FsModel();
        $this->resource = FsResource::class;
        $this->resourceDetail = FsResourceDetail::class;
    }

    public function common()
    {
        $common = parent::common();
        $common['typeOption'] = FsConfig::TYPE_OPTION;
        $common['PushChannelOption'] = FsConfig::PUSH_CHANNEL;
        // 多语言
        $languageArr = TweetConfigService::getLanguageStatus();
        // dd($languageArr);
        $common['language_status'] = $languageArr['language_status'];
        $common['default_language'] = $languageArr['default_language'];
        $common['multilingualoption'] = $languageArr['languagesOption'];
        // $common['languagesOption'] = $array;
        return $common;
    }
}
